<?php $assetsUri=$this->assetsUri();$currPageUrl=parse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH);$ZGHEAD=<<<S
<link rel="stylesheet" type="text/css" href="{$assetsUri}/css/default.css">
<script src="/i/d/js/zmsun/zmsunupload.js"></script>
<script type="text/javascript" src="{$assetsUri}/js/default.js"></script>
S;
$contentStr=$pagerStr=$pagerItemStr='';$archive=new Zmsun\System\Template\TemplatePackageArchive();$files=$archive->getList();$paginator=$this->helper("Paginator");$paginator->setPageSize(10)->setPagerSize(5)->setTotals(count($files))->setCurrentPageNum($_GET['page']?? 1)->setNextTxt("")->setPrevTxt("");$offset=$paginator->currentPageOffset();$trans=['enterpr'=>'企业版'];foreach(array_slice($files,$offset['begin'],$offset['length'])as$packageInfo){if(array_key_exists($packageInfo['template_type'],$trans)){$siteVersion=$trans[$packageInfo['template_type']];}else{$siteVersion='Unknown';}$contentStr.=<<<S
<tr class="item-info" data-file-name="{$packageInfo['filename']}">
	<td class="title">
		<div class="title-wrapper">
			<b class="item-checkbox J_TItemCheckbox"></b>
			<p class="title-text">{$packageInfo['filename']}</p>
		</div>
	</td>
	<td class="g_filename"><span>{$packageInfo['template_name']}</span></td>
	<td class="ellipsis"><span>{$packageInfo['template_id']}</span></td>
	<td class="ellipsis g_tel"><span>{$packageInfo['template_version']}</span></td>
	<td class="author ellipsis"><a>{$siteVersion}</a></td>
	<td class="ellipsis g_mail"><span>{$packageInfo['filesize']}</span></td>
	<td class="opt">
		<a class="J_TItemDel">删除</a>
		<a class="J_TItemDownload" href="{$packageInfo['download_addr']}" target="_blank">下载</a>
	</td>
</tr>
S;
}if(!$contentStr)$contentStr='<tr class="item-info"><td colspan="8">没有记录</td></tr>';?> <div id="zmsun_sidebar"><div class="wrapper"><div class="sidebarTit"><h2>模板管理</h2></div><div class="sidebarBox" data-widget-zmsunscrollbar><div class="sidebarAccordion"><div class="accordionTit"><h4><a href="<?=$this->baseUri ?>/template"><span>当前使用的模板</span></a></h4></div><div class="accordionTit"><h4><a href="<?=$this->baseUri ?>/template/list"><span>我的模板</span></a></h4></div><!--<div class="accordionTit"><h4><a href="<?=$this->baseUri ?>/template/insert"><span>新增模板</span></a></h4></div>--><div class="accordionTit itemActive"><h4><a href="<?=$this->baseUri ?>/template/package"><span>模板包</span></a></h4></div></div></div></div><div class="switch"><p><i></i></p></div></div><div id="zmsun_main"><div id="zmsun_toolbar"><div class="item-funcs item-funcs1"><ul class="item-opts"><li class="createPackageTrigBtn"><a>创建包</a></li><li class="uploadPackageTrigBtn"><a>导入包</a></li></ul><div class="upBox"></div></div></div><div id="zmsun_a_content"><div class="item-funcs item-funcs2"><ul class="item-opts"><li class="check-all-items"><em class="check-all-box"></em><span class="check-all-text">全选</span></li><li class="J_TBatchDelTrigBtn"><a class="J_TGoldData">批量删除</a></li></ul></div><table class="productHead"><caption class="hidden">模板包列表</caption><colgroup><col width="14%"><col width="13%"><col width="8%"><col width="10%"><col width="13%"><col width="10%"><col width="auto"></colgroup><thead class="items-tb-hd"><tr><th class="col-title" scope="col">文件</th><th class="col-title" scope="col">名称</th><th class="col-cat-edit" scope="col">本地ID</th><th class="col-price" scope="col"><div class="price-wrap"><span class="from-label">版本</span></div></th><th class="col-price" scope="col"><div class="price-wrap"><span class="from-label">网站版本</span></div></th><th class="col-price" scope="col"><div class="price-wrap"><span class="from-label">大小</span></div></th><th class="col-opt">操作</th></tr></thead><tbody></tbody></table><div class="table-outer"><div class="ks-container"><div class="table-inner ks-body"><table class="items-table"><colgroup><col width="14%"><col width="13%"><col width="8%"><col width="10%"><col width="13%"><col width="10%"><col width="auto"></colgroup><tbody class="item-list"><?=$contentStr ?></tbody></table></div></div><div class="pagination"><?php echo$paginator->html()?></div></div></div><div class="createPackageDialog hidden"><p class="errorNot hidden"><span class="tx"></span><span class="againBtn">重试</span></p><div class="opttip hidden"><div class="zmsun_fieldItem"><label class="itemName">文件名</label><div class="subItems"><input type="text" name="package_name" maxlength="50"><div class="optTips optTips_prompt"><em class="tipIcon"></em><span class="des">可选，模板包名称，只能由字母数字、“_”和“-”组成，最多50个字符。</span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">模板</label><div class="subItems"><select name="used_template_id"></select><div class="optTips"><em class="tipIcon"></em><span class="des"></span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">数据包</label><div class="subItems"><select name="used_data_package"><option value="">无</option><option value="">默认[zm_pr_def.zip]</option></select><div class="optTips"><em class="tipIcon"></em><span class="des"></span></div></div></div><div class="opt"><div class="blackBtn confirmBtn"><button type="button">确定</button></div><div class="cancleBtn lightGreyBtn"><button type="button">取消</button></div></div></div><div class="backupProgress hidden"><div class="waitingbar"></div><p class="waitTip"><em></em>正在创建，完成后自动关闭此提示窗口！</p></div></div><div class="singleDelPackageDialog hidden"><div class="opttip"><p>删除不可恢复，确定删除?</p><div class="opt"><div class="blackBtn confirmBtn"><button type="button">确定</button></div><div class="cancleBtn lightGreyBtn"><button type="button">取消</button></div></div></div></div><div class="batchDelPackageDialog hidden"><div class="opttip"><p>删除不可恢复，确定删除?</p><div class="opt"><div class="blackBtn confirmBtn"><button type="button">确定</button></div><div class="cancleBtn lightGreyBtn"><button type="button">取消</button></div></div></div></div></div>